﻿using Com.Lancetinc.Evs.Controls;
using Com.Lancetinc.Evs.Helpers;
using System.Threading.Tasks;
using System.Windows;

namespace Com.Lancetinc.Evs.Windows
{
    public partial class AboutControl : ISettingFlyoutControl
    {
        public AboutControl()
        {
            InitializeComponent();
        }


        private void BtnClose_OnClick(object sender, RoutedEventArgs e)
        {
            Close();
        }

        private void Close()
        {
            (this.Parent as SettingFlyout)?.CloseFlyout();
        }

        /// <inheritdoc />
        public string Title => I18nHelper.Default.GetMessage("AboutWindow.Title");

        /// <inheritdoc />
        public bool IsPinned => false;

        /// <inheritdoc />
        public double WidthRequest => 500;

        /// <inheritdoc />
        public Task<bool> ConfirmCloseAsync()
        {
            return Task.FromResult(true);
        }
    }
}
